home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Technology Seed / August 1998 ADC Seed CD.toast / Mac OS 8.5b2 / allegro-b2-pseudo-SDK / AIncludes / ATSUnicode.a < prev    next >
Encoding:
Text File  |  1998-07-17  |  35.7 KB  |  1,000 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ATSUnicode.a
  3. ;
  4. ;    Contains:    Public interfaces for Apple Type Services for Unicode Imaging
  5. ;
  6. ;    Version:    Technology:    Allegro
  7. ;                Release:    Allego Seed, Use with 3.1 Universal Interfaces
  8. ;
  9. ;    Copyright:    © 1997-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__ATSUNICODE__') = 'UNDEFINED' THEN
  19. __ATSUNICODE__ SET 1
  20.  
  21.     IF &TYPE('__ATSLAYOUTTYPES__') = 'UNDEFINED' THEN
  22.     include 'ATSLayoutTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__SFNTLAYOUTTYPES__') = 'UNDEFINED' THEN
  25.     include 'SFNTLayoutTypes.a'
  26.     ENDIF
  27.  
  28.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  29.     include 'MacTypes.a'
  30.     ENDIF
  31.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  32.     include 'Quickdraw.a'
  33.     ENDIF
  34.     IF &TYPE('__TEXTCOMMON__') = 'UNDEFINED' THEN
  35.     include 'TextCommon.a'
  36.     ENDIF
  37.  
  38. ; ***********
  39. ;     Types    
  40. ; ***********
  41. ; typedef UniCharArrayPtr *                UniCharArrayHandle
  42.  
  43.  
  44. ;      UniCharArrayHandle is a handle type to correspond to 
  45. ;      UniCharArrayPtr, defined in Unicode.h.  It refers 
  46. ;      to a handle, interpreted as a pointer to an array 
  47. ;      of UniChar's (UInt16's).
  48.  
  49.  
  50. ; typedef UInt32                         UniCharArrayOffset
  51.  
  52.  
  53. ;      UniCharArrayOffset is used to indicate an offset 
  54. ;      into an array of UniChar's (UInt16's).  
  55.  
  56.  
  57. ; typedef Fixed                         ATSUTextMeasurement
  58.  
  59.  
  60. ;      ATSUTextMeasurement is exactly what its name implies:  
  61. ;      a measurement of the size in some direction of text:  
  62. ;      height, width, ascent, descent, and so on.  
  63.  
  64.  
  65. ; typedef UInt32                         ATSUFontID
  66.  
  67.  
  68. ;      ATSUFontID indicates a particular font family and face.  
  69. ;      ATSUFontID's are not guaranteed to remain constant across 
  70. ;      reboots.  Clients should use the font's unique name to 
  71. ;      get a font token to store in documents which is 
  72. ;      guaranteed to remain constant across reboots. 
  73.  
  74.  
  75. ; typedef UInt16                         ATSUFontFeatureType
  76.  
  77. ; typedef UInt16                         ATSUFontFeatureSelector
  78.  
  79.  
  80. ;      ATSUFontFeatureType and ATSUFontFeatureSelector are used 
  81. ;      to identify font features.  
  82.  
  83.  
  84. ; typedef FourCharCode                     ATSUFontVariationAxis
  85.  
  86. ; typedef Fixed                         ATSUFontVariationValue
  87.  
  88.  
  89. ;      ATSUFontVariationAxis and ATSUFontVariationValue are used 
  90. ;      in connection with font variations.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. ;      ATSUTextLayout is used to store the attribute information 
  97. ;      associated with a contiguous block of UniChar's (UInt16's) 
  98. ;      in memory.  It's typed to be an opaque structure.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. ;      ATSUStyle is used to store a set of individual attributes, 
  105. ;      font features, and font variations.  It's typed to be 
  106. ;      an opaque structure.  
  107.  
  108.  
  109. ; typedef UInt32                         ATSUAttributeTag
  110.  
  111.  
  112. ;      ATSUAttributeTag is used to indicate the particular type 
  113. ;      of attribute under consideration:  font, size, color, 
  114. ;      and so on.  
  115. ;      Each style run may have at most one attribute with a 
  116. ;      given ATSUAttributeTag (i.e., a style run can't have 
  117. ;      more than one font or size) but may have none.  
  118.  
  119.  
  120. ; typedef void *                        ATSUAttributeValuePtr
  121.  
  122.  
  123. ;      ATSUAttributeValuePtr is used to provide generic access 
  124. ;      to storage of attribute values, which vary in size.
  125.  
  126.  
  127. ATSUAttributeInfo        RECORD 0
  128. fTag                     ds.l    1                ; offset: $0 (0)
  129. fValueSize                 ds.l    1                ; offset: $4 (4)
  130. sizeof                     EQU *                    ; size:   $8 (8)
  131.                         ENDR
  132.  
  133. ;      ATSUAttributeInfo is used to provide a tag/size pairing.  
  134. ;      This makes it possible to provide the client information   
  135. ;      about all the attributes for a given range of text.  This   
  136. ;      structure is only used to return to the client information   
  137. ;      about a complete set of attributes.  An array of   
  138. ;      ATSUAttributeInfos is passed as a parameter so that the   
  139. ;      client can find out what attributes are set and what their   
  140. ;      individual sizes are; with that information, they can then   
  141. ;      query about the values of the attributes they're interested   
  142. ;      in.  Because arrays of ATSUAttributeInfos are used as parameters   
  143. ;      to functions, they have to be of a fixed size, hence the   
  144. ;      value is not included in the structure.  
  145.  
  146.  
  147. ATSUCaret                RECORD 0
  148. fX                         ds.l    1                ; offset: $0 (0)
  149. fY                         ds.l    1                ; offset: $4 (4)
  150. fDeltaX                     ds.l    1                ; offset: $8 (8)
  151. fDeltaY                     ds.l    1                ; offset: $C (12)
  152. sizeof                     EQU *                    ; size:   $10 (16)
  153.                         ENDR
  154.  
  155. ;      ATSUCaret is to contain complete information regarding a caret:  
  156. ;      its x- and y-positions (relative to the line's origin), and 
  157. ;      a delta-x and delta-y indicating the caret's slope.  If the 
  158. ;      caret is vertical, fDeltaX is 0; if it's horizontal, fDeltaY 
  159. ;      is 0.  
  160.  
  161.  
  162. ; typedef int                             ATSUCursorMovementType
  163.  
  164.  
  165. ;      ATSUCursorMovementType currently can take three values 
  166. ;      (kATSUByCharacter, kATSUByCluster, and kATSUByWord) 
  167. ;      and is used to indicate how much to move the cursor.  
  168.  
  169.  
  170. ; typedef UInt16                         ATSUVerticalCharacterType
  171.  
  172.  
  173. ;      ATSUVerticalCharacterType currently can take two values 
  174. ;      (kATSUStronglyVertical, and kATSUStronglyHorizontal) and 
  175. ;      is used to indicate whether text is to be laid out as 
  176. ;      vertical glyphs or horizontal glyphs.  
  177.  
  178.  
  179. ; typedef UInt16                         ATSUStyleComparison
  180.  
  181.  
  182. ;      ATSUStyleComparison is an enumeration with four values 
  183. ;      (kATUStyleUnequal, ATSUStyleContains, kATSUStyleEquals, 
  184. ;      and kATSUStyleContainedBy), and is used by ATSUCompareStyles() 
  185. ;      to indicate if the first style parameter contains as a 
  186. ;      proper subset, is equal to, or is contained by the second 
  187. ;      style parameter.
  188.  
  189.  
  190. ; ***************************************************
  191. ;     Gestalt selectors                                
  192. ;         Move into Gestalt.i when they're stable!!!!    
  193. ; ***************************************************
  194.  
  195. gestaltATSUVersion                EQU        'uisv'
  196. gestaltATSUFeatures                EQU        'uisf'
  197.  
  198. gestaltOriginalATSUVersion        EQU        $00010000
  199. ; ***************
  200. ;     Error codes    
  201. ; ***************
  202.  
  203. kATSUInvalidTextLayoutErr        EQU        -8790                ;    An attempt was made to use a ATSUTextLayout 
  204.                                                             ;    which hadn't been initialized or is otherwise 
  205.                                                             ;    in an invalid state. 
  206. kATSUInvalidStyleErr            EQU        -8791                ;    An attempt was made to use a ATSUStyle which  
  207.                                                             ;    hadn't been properly allocated or is otherwise  
  208.                                                             ;    in an invalid state.  
  209. kATSUInvalidTextRangeErr        EQU        -8792                ;    An attempt was made to extract information   
  210.                                                             ;    information from or perform an operation on a   
  211.                                                             ;    ATSUTextLayout for a range of text not covered   
  212.                                                             ;    by the ATSUTextLayout.  
  213. kATSUFontsMatched                EQU        -8793                ;    This is not an error code but is returned by    
  214.                                                             ;    ATSUMatchFontsToText() when changes need to    
  215.                                                             ;    be made to the fonts associated with the text.  
  216. kATSUFontsNotMatched            EQU        -8794                ;    This value is returned by ATSUMatchFontsToText()    
  217.                                                             ;    when the text contains Unicode characters which    
  218.                                                             ;    cannot be represented by any installed font.  
  219. kATSUNoCorrespondingFontErr        EQU        -8795                ;    This value is retrned by font ID conversion 
  220.                                                             ;    routines ATSUFONDtoFontID() and ATSUFontIDtoFOND() 
  221.                                                             ;    to indicate that the input font ID is valid but 
  222.                                                             ;    there is no conversion possible.  For example, 
  223.                                                             ;    data-fork fonts can only be used with ATSUI not 
  224.                                                             ;    the FontManager, and so converting an ATSUIFontID 
  225.                                                             ;    for such a font will fail.   
  226. kATSUInvalidFontErr                EQU        -8796                ;    Used when an attempt was made to use an invalid font ID.
  227. kATSUInvalidAttributeValueErr    EQU        -8797                ;    Used when an attempt was made to use an attribute with 
  228.                                                             ;    a bad or undefined value.  
  229. kATSUInvalidAttributeSizeErr    EQU        -8798                ;    Used when an attempt was made to use an attribute with a 
  230.                                                             ;    bad size.  
  231. kATSUInvalidAttributeTagErr        EQU        -8799                ;    Used when an attempt was made to use a tag value that
  232.                                                             ;    was not appropriate for the function call it was used.  
  233. kATSUInvalidCacheErr            EQU        -8800                ;    Used when an attempt was made to read in style data 
  234.                                                             ;    from an invalid cache.  Either the format of the 
  235.                                                             ;    cached data doesn't match that used by Apple Type 
  236.                                                             ;    Services for Unicode™ Imaging, or the cached data 
  237.                                                             ;    is corrupt.  
  238. kATSUNotSetErr                    EQU        -8801                ;    Used when the client attempts to retrieve an attribute, 
  239.                                                             ;    font feature, or font variation from a style when it 
  240.                                                             ;    hadn't been set.  In such a case, the default value will
  241.                                                             ;    be returned for the attribute's value.
  242. kATSUNoStyleRunsAssignedErr        EQU        -8802                ;    Used when an attempt was made to measure, highlight or draw
  243.                                                             ;    a ATSUTextLayout object that has no styleRuns associated with it.
  244.                                                             ;    Used when QuickDraw Text encounters an error rendering or measuring
  245. kATSUQuickDrawTextErr            EQU        -8803                ;    a line of ATSUI text.
  246. ; ******************************************************************************
  247. ;     ATSUI Attribute tags:  Apple reserves values 0 to 65,535 (0 to 0x0000FFFF) 
  248. ;     ATSUI clients may create their own tags with any other value               
  249. ; ******************************************************************************
  250. ;     Line Control Attribute Tags 
  251.  
  252. kATSULineWidthTag                EQU        1                    ;    Type:            ATSUTextMeasurement
  253.                                                             ;    Default value:    0
  254. kATSULineRotationTag            EQU        2                    ;    Type:            Fixed (fixed value in degrees in right-handed coordinate system)
  255.                                                             ;    Default value:    0
  256. kATSULineDirectionTag            EQU        3                    ;    Type:            Boolean; values 0 or 1 (see below for value identities)
  257.                                                             ;    Default value:    kATSULeftToRightBaseDirection
  258. kATSULineJustificationFactorTag    EQU        4                    ;    Type:            Fract between 0 and 1
  259.                                                             ;    Default value:    kATSUNoJustification
  260. kATSULineFlushFactorTag            EQU        5                    ;    Type:            Fract between 0 and 1 
  261.                                                             ;    Default value:    kATSUStartAlignment
  262. kATSULineBaselineValuesTag        EQU        6                    ;    Type:            BslnBaselineRecord
  263.                                                             ;    Default value:    All zeros.  Calculated from other style attributes (e.g., font and point size)
  264.                                                             ;    Type:            UInt32
  265. kATSULineLayoutOptionsTag        EQU        7                    ;    Default value:    kATSUNoLayoutOptions - other options listed in ATSLayoutTypes.h
  266. ;     Run Style Attribute Tags 
  267.  
  268.                                                             ; QuickDraw compatibility tags 
  269. kATSUQDBoldfaceTag                EQU        256                    ;    Type:            Boolean    
  270.                                                             ;    Default value:    false
  271. kATSUQDItalicTag                EQU        257                    ;    Type:            Boolean        
  272.                                                             ;    Default value:    false
  273. kATSUQDUnderlineTag                EQU        258                    ;    Type:            Boolean    
  274.                                                             ;    Default value:    false
  275. kATSUQDCondensedTag                EQU        259                    ;    Type:            Boolean    
  276.                                                             ;    Default value:    false
  277. kATSUQDExtendedTag                EQU        260                    ;    Type:            Boolean    
  278.                                                             ;    Default value:    false
  279.                                                             ; Common run tags 
  280. kATSUFontTag                    EQU        261                    ;    Type:            ATSUFontID    
  281.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFond )
  282. kATSUSizeTag                    EQU        262                    ;    Type:            Fixed    
  283.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptAppFondSize )    
  284. kATSUColorTag                    EQU        263                    ;    Type:            RGBColor    
  285.                                                             ;    Default value:    (0, 0, 0)
  286. kATSULanguageTag                EQU        264                    ;    Type:            RegionCode    
  287.                                                             ;    Default value:    GetScriptVariable( smSystemScript, smScriptLang )
  288.                                                             ;    Less common run tags 
  289. kATSUVerticalCharacterTag        EQU        265                    ;    Type:            ATSUVerticalCharacterType    
  290.                                                             ;    Default value:    kATSUStronglyHorizontal
  291. kATSUImposeWidthTag                EQU        266                    ;    Type:            ATSUTextMeasurement
  292.                                                             ;    Default value:    0
  293. kATSUBeforeWithStreamShiftTag    EQU        267                    ;    Type:            Fixed
  294.                                                             ;    Default value:    0
  295. kATSUAfterWithStreamShiftTag    EQU        268                    ;    Type:            Fixed
  296.                                                             ;    Default value:    0
  297. kATSUCrossStreamShiftTag        EQU        269                    ;    Type:            Fixed
  298.                                                             ;    Default value:    0
  299. kATSUTrackingTag                EQU        270                    ;    Type:            Fixed
  300.                                                             ;    Default value:    0
  301. kATSUHangingInhibitFactorTag    EQU        271                    ;    Type:            Fract between 0 and 1
  302.                                                             ;    Default value:    0
  303. kATSUKerningInhibitFactorTag    EQU        272                    ;    Type:            Fract between 0 and 1
  304.                                                             ;    Default value:    0
  305. kATSUDecompositionFactorTag        EQU        273                    ;    Type:            Fixed (-1.0 -> 1.0)
  306.                                                             ;    Default value:    0
  307. kATSUBaselineClassTag            EQU        274                    ;    Type:            BslnBaselineClass  (see SFNTLayoutTypes.h)
  308.                                                             ;    Default value:    kBSLNNoBaselineOverride
  309. kATSUPriorityJustOverrideTag    EQU        275                    ;    Type:            ATSJustPriorityWidthDeltaOverrides (see ATSLayoutTypes.h)
  310.                                                             ;    Default value:    all zeros
  311. kATSUNoLigatureSplitTag            EQU        276                    ;    Type:            Boolean
  312.                                                             ;    Default value:    false - ligatures and compound characters have divisable components.
  313. kATSUNoCaretAngleTag            EQU        277                    ;    Type:            Boolean
  314.                                                             ;    Default value:    false - use the character's angularity to determine its boundaries
  315. kATSUSuppressCrossKerningTag    EQU        278                    ;    Type:            Boolean
  316.                                                             ;    Default value:    false - do not suppress automatic cross kerning (defined by font)
  317. kATSUNoOpticalAlignmentTag        EQU        279                    ;    Type:            Boolean
  318.                                                             ;    Default value:    false - do not suppress character's automatic optical positional alignment
  319. kATSUForceHangingTag            EQU        280                    ;    Type:            Boolean
  320.                                                             ;    Default value:    false - do not force the character's to hang beyond the line boundaries
  321. kATSUNoSpecialJustificationTag    EQU        281                    ;    Type:            Boolean
  322.                                                             ;    Default value:    false - perform post-compensation justification if needed
  323. kATSUMaxATSUITagValue            EQU        65535                ;    This is the maximum Apple ATSUI reserved tag value.  Client defined tags must be larger.
  324. ; *******************************
  325. ;     Enumerations and constants    
  326. ; *******************************
  327. ;  Cursor movement 
  328.  
  329. kATSUByCharacter                EQU        0
  330. kATSUByCluster                    EQU        1
  331. kATSUByWord                        EQU        2
  332. ;  Vertical text types 
  333.  
  334. kATSUStronglyHorizontal            EQU        0
  335. kATSUStronglyVertical            EQU        1
  336. ;  Line direction types (used for kATSULineDirectionTag values) 
  337.  
  338. kATSULeftToRightBaseDirection    EQU        0                    ;    Impose left-to-right or top-to-bottom dominant direction 
  339. kATSURightToLeftBaseDirection    EQU        1                    ;    Impose right-to-left or bottom-to-top dominant direction 
  340. ;  Style comparison types 
  341.  
  342. kATSUStyleUnequal                EQU        0
  343. kATSUStyleContains                EQU        1
  344. kATSUStyleEquals                EQU        2
  345. kATSUStyleContainedBy            EQU        3
  346. ;  LineFlushFactor convenience defined values 
  347.  
  348. kATSUStartAlignment                EQU        $00000000
  349. kATSUEndAlignment                EQU        $40000000
  350. kATSUCenterAlignment            EQU        $20000000
  351. ;  LineJustificationFactor convenience defined values 
  352.  
  353. kATSUNoJustification            EQU        $00000000
  354. kATSUFullJustification            EQU        $40000000
  355. ;  Other constants    
  356.  
  357. kATSUInvalidFontID                EQU        0
  358.  
  359.  
  360. kATSUUseLineControlWidth        EQU        $7FFFFFFF
  361.  
  362.  
  363. kATSUUseGrafPortPenLoc            EQU        $FFFFFFFF
  364. kATSUClearAll                    EQU        $FFFFFFFF
  365.  
  366.  
  367. kATSUFromTextBeginning            EQU        $FFFFFFFF
  368. kATSUToTextEnd                    EQU        $FFFFFFFF
  369.  
  370. ; ***************
  371. ;     Functions    
  372. ; ***************
  373.  
  374. ;     Basic style functions    
  375. ;
  376. ; extern OSStatus ATSUCreateStyle(ATSUStyle *oStyle)
  377. ;
  378.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  379.         IMPORT_CFM_FUNCTION ATSUCreateStyle
  380.     ENDIF
  381.  
  382. ;
  383. ; extern OSStatus ATSUCreateAndCopyStyle(ATSUStyle iStyle, ATSUStyle *oStyle)
  384. ;
  385.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  386.         IMPORT_CFM_FUNCTION ATSUCreateAndCopyStyle
  387.     ENDIF
  388.  
  389. ;
  390. ; extern OSStatus ATSUDisposeStyle(ATSUStyle iStyle)
  391. ;
  392.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  393.         IMPORT_CFM_FUNCTION ATSUDisposeStyle
  394.     ENDIF
  395.  
  396. ;
  397. ; extern OSStatus ATSUSetStyleRefCon(ATSUStyle iStyle, UInt32 iRefCon)
  398. ;
  399.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  400.         IMPORT_CFM_FUNCTION ATSUSetStyleRefCon
  401.     ENDIF
  402.  
  403. ;
  404. ; extern OSStatus ATSUGetStyleRefCon(ATSUStyle iStyle, UInt32 *oRefCon)
  405. ;
  406.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  407.         IMPORT_CFM_FUNCTION ATSUGetStyleRefCon
  408.     ENDIF
  409.  
  410.  
  411. ;     Style comparison         
  412. ;
  413. ; extern OSStatus ATSUCompareStyles(ATSUStyle iFirstStyle, ATSUStyle iSecondStyle, ATSUStyleComparison *oComparison)
  414. ;
  415.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  416.         IMPORT_CFM_FUNCTION ATSUCompareStyles
  417.     ENDIF
  418.  
  419. ;     Attribute manipulations    
  420. ;
  421. ; extern OSStatus ATSUCopyAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  422. ;
  423.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  424.         IMPORT_CFM_FUNCTION ATSUCopyAttributes
  425.     ENDIF
  426.  
  427. ;
  428. ; extern OSStatus ATSUOverwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  429. ;
  430.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  431.         IMPORT_CFM_FUNCTION ATSUOverwriteAttributes
  432.     ENDIF
  433.  
  434. ;
  435. ; extern OSStatus ATSUUnderwriteAttributes(ATSUStyle iSourceStyle, ATSUStyle iDestinationStyle)
  436. ;
  437.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  438.         IMPORT_CFM_FUNCTION ATSUUnderwriteAttributes
  439.     ENDIF
  440.  
  441. ;     Empty styles    
  442. ;
  443. ; extern OSStatus ATSUClearStyle(ATSUStyle iStyle)
  444. ;
  445.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  446.         IMPORT_CFM_FUNCTION ATSUClearStyle
  447.     ENDIF
  448.  
  449. ;
  450. ; extern OSStatus ATSUStyleIsEmpty(ATSUStyle iStyle, Boolean *isClear)
  451. ;
  452.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  453.         IMPORT_CFM_FUNCTION ATSUStyleIsEmpty
  454.     ENDIF
  455.  
  456. ;     Clipboard support    
  457. ;
  458. ; extern OSStatus ATSUCopyToHandle(ATSUStyle iStyle, Handle oStyleHandle)
  459. ;
  460.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  461.         IMPORT_CFM_FUNCTION ATSUCopyToHandle
  462.     ENDIF
  463.  
  464. ;
  465. ; extern OSStatus ATSUPasteFromHandle(ATSUStyle iStyle, Handle iStyleHandle)
  466. ;
  467.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  468.         IMPORT_CFM_FUNCTION ATSUPasteFromHandle
  469.     ENDIF
  470.  
  471. ;     Get and set attributes 
  472. ;
  473. ; extern OSStatus ATSUCalculateBaselineDeltas(ATSUStyle iStyle, BslnBaselineClass iBaselineClass, BslnBaselineRecord oBaselineDeltas)
  474. ;
  475.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  476.         IMPORT_CFM_FUNCTION ATSUCalculateBaselineDeltas
  477.     ENDIF
  478.  
  479. ;
  480. ; extern OSStatus ATSUSetAttributes(ATSUStyle iStyle, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  481. ;
  482.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION ATSUSetAttributes
  484.     ENDIF
  485.  
  486. ;
  487. ; extern OSStatus ATSUGetAttribute(ATSUStyle iStyle, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  488. ;
  489.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  490.         IMPORT_CFM_FUNCTION ATSUGetAttribute
  491.     ENDIF
  492.  
  493. ;
  494. ; extern OSStatus ATSUGetAllAttributes(ATSUStyle iStyle, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  495. ;
  496.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  497.         IMPORT_CFM_FUNCTION ATSUGetAllAttributes
  498.     ENDIF
  499.  
  500. ;
  501. ; extern OSStatus ATSUClearAttributes(ATSUStyle iStyle, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  502. ;
  503.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  504.         IMPORT_CFM_FUNCTION ATSUClearAttributes
  505.     ENDIF
  506.  
  507. ;     Font features    
  508. ;
  509. ; extern OSStatus ATSUSetFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  510. ;
  511.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  512.         IMPORT_CFM_FUNCTION ATSUSetFontFeatures
  513.     ENDIF
  514.  
  515. ;
  516. ; extern OSStatus ATSUGetFontFeature(ATSUStyle iStyle, ItemCount iFeatureIndex, ATSUFontFeatureType *oFeatureType, ATSUFontFeatureSelector *oFeatureSelector)
  517. ;
  518.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION ATSUGetFontFeature
  520.     ENDIF
  521.  
  522. ;
  523. ; extern OSStatus ATSUGetAllFontFeatures(ATSUStyle iStyle, ItemCount iMaximumFeatureCount, ATSUFontFeatureType *oFeatureType, ATSUFontFeatureSelector *oFeatureSelector, ItemCount *oActualFeatureCount)
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  526.         IMPORT_CFM_FUNCTION ATSUGetAllFontFeatures
  527.     ENDIF
  528.  
  529. ;
  530. ; extern OSStatus ATSUClearFontFeatures(ATSUStyle iStyle, ItemCount iFeatureCount, ATSUFontFeatureType iType[2147483647], ATSUFontFeatureSelector iSelector[2147483647])
  531. ;
  532.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  533.         IMPORT_CFM_FUNCTION ATSUClearFontFeatures
  534.     ENDIF
  535.  
  536. ;     Font variations    
  537. ;
  538. ; extern OSStatus ATSUSetVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis iAxis[2147483647], ATSUFontVariationValue iValue[2147483647])
  539. ;
  540.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  541.         IMPORT_CFM_FUNCTION ATSUSetVariations
  542.     ENDIF
  543.  
  544. ;
  545. ; extern OSStatus ATSUGetFontVariationValue(ATSUStyle iStyle, ATSUFontVariationAxis iATSUFontVariationAxis, ATSUFontVariationValue *oATSUFontVariationValue)
  546. ;
  547.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  548.         IMPORT_CFM_FUNCTION ATSUGetFontVariationValue
  549.     ENDIF
  550.  
  551. ;
  552. ; extern OSStatus ATSUGetAllFontVariations(ATSUStyle iStyle, ItemCount iVariationCount, ATSUFontVariationAxis oVariationAxes[2147483647], ATSUFontVariationValue oATSUFontVariationValues[2147483647], ItemCount *oActualVariationCount)
  553. ;
  554.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION ATSUGetAllFontVariations
  556.     ENDIF
  557.  
  558. ;
  559. ; extern OSStatus ATSUClearFontVariations(ATSUStyle iStyle, ItemCount iAxisCount, ATSUFontVariationAxis iAxis[2147483647])
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  562.         IMPORT_CFM_FUNCTION ATSUClearFontVariations
  563.     ENDIF
  564.  
  565. ;     Basic text-layout functions    
  566. ;
  567. ; extern OSStatus ATSUCreateTextLayout(ATSUTextLayout *oTextLayout)
  568. ;
  569.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  570.         IMPORT_CFM_FUNCTION ATSUCreateTextLayout
  571.     ENDIF
  572.  
  573. ;
  574. ; extern OSStatus ATSUCreateTextLayoutWithTextPtr(ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  575. ;
  576.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  577.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextPtr
  578.     ENDIF
  579.  
  580. ;
  581. ; extern OSStatus ATSUCreateTextLayoutWithTextHandle(UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength, ItemCount iNumberOfRuns, UniCharCount iRunLengths[2147483647], ATSUStyle iStyles[2147483647], ATSUTextLayout *oTextLayout)
  582. ;
  583.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION ATSUCreateTextLayoutWithTextHandle
  585.     ENDIF
  586.  
  587. ;
  588. ; extern OSStatus ATSUDisposeTextLayout(ATSUTextLayout iTextLayout)
  589. ;
  590.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  591.         IMPORT_CFM_FUNCTION ATSUDisposeTextLayout
  592.     ENDIF
  593.  
  594. ;
  595. ; extern OSStatus ATSUSetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 iRefCon)
  596. ;
  597.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  598.         IMPORT_CFM_FUNCTION ATSUSetTextLayoutRefCon
  599.     ENDIF
  600.  
  601. ;
  602. ; extern OSStatus ATSUGetTextLayoutRefCon(ATSUTextLayout iTextLayout, UInt32 *oRefCon)
  603. ;
  604.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  605.         IMPORT_CFM_FUNCTION ATSUGetTextLayoutRefCon
  606.     ENDIF
  607.  
  608. ;     Text location    
  609. ;
  610. ; extern OSStatus ATSUSetTextPointerLocation(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  611. ;
  612.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  613.         IMPORT_CFM_FUNCTION ATSUSetTextPointerLocation
  614.     ENDIF
  615.  
  616. ;
  617. ; extern OSStatus ATSUSetTextHandleLocation(ATSUTextLayout iTextLayout, UniCharArrayHandle iText, UniCharArrayOffset iTextOffset, UniCharCount iTextLength, UniCharCount iTextTotalLength)
  618. ;
  619.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  620.         IMPORT_CFM_FUNCTION ATSUSetTextHandleLocation
  621.     ENDIF
  622.  
  623. ;
  624. ; extern OSStatus ATSUGetTextLocation(ATSUTextLayout iTextLayout, void **oText, Boolean *oTextIsStoredInHandle, UniCharArrayOffset *oOffset, UniCharCount *oTextLength, UniCharCount *oTextTotalLength)
  625. ;
  626.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION ATSUGetTextLocation
  628.     ENDIF
  629.  
  630. ;     Text manipulation    
  631. ;
  632. ; extern OSStatus ATSUTextDeleted(ATSUTextLayout iTextLayout, UniCharArrayOffset iDeletedRangeStart, UniCharCount iDeletedRangeLength)
  633. ;
  634.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION ATSUTextDeleted
  636.     ENDIF
  637.  
  638. ;
  639. ; extern OSStatus ATSUTextInserted(ATSUTextLayout iTextLayout, UniCharArrayOffset iInsertionLocation, UniCharCount iInsertionLength)
  640. ;
  641.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  642.         IMPORT_CFM_FUNCTION ATSUTextInserted
  643.     ENDIF
  644.  
  645. ;
  646. ; extern OSStatus ATSUTextMoved(ATSUTextLayout iTextLayout, ConstUniCharArrayPtr iNewLocation)
  647. ;
  648.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  649.         IMPORT_CFM_FUNCTION ATSUTextMoved
  650.     ENDIF
  651.  
  652. ;     Layout controls    
  653. ;
  654. ; extern OSStatus ATSUCopyLayoutControls(ATSUTextLayout iSource, ATSUTextLayout iDest)
  655. ;
  656.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  657.         IMPORT_CFM_FUNCTION ATSUCopyLayoutControls
  658.     ENDIF
  659.  
  660. ;
  661. ; extern OSStatus ATSUSetLayoutControls(ATSUTextLayout iLayout, ItemCount iAttributeCount, ATSUAttributeTag iTag[2147483647], ByteCount iValueSize[2147483647], ATSUAttributeValuePtr iValue[2147483647])
  662. ;
  663.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  664.         IMPORT_CFM_FUNCTION ATSUSetLayoutControls
  665.     ENDIF
  666.  
  667. ;
  668. ; extern OSStatus ATSUGetLayoutControl(ATSUTextLayout iLayout, ATSUAttributeTag iTag, ByteCount iExpectedValueSize, ATSUAttributeValuePtr oValue, ByteCount *oActualValueSize)
  669. ;
  670.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  671.         IMPORT_CFM_FUNCTION ATSUGetLayoutControl
  672.     ENDIF
  673.  
  674. ;
  675. ; extern OSStatus ATSUGetAllLayoutControls(ATSUTextLayout iLayout, ATSUAttributeInfo oAttributeInfoArray[2147483647], ItemCount iTagValuePairArraySize, ItemCount *oTagValuePairCount)
  676. ;
  677.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  678.         IMPORT_CFM_FUNCTION ATSUGetAllLayoutControls
  679.     ENDIF
  680.  
  681. ;
  682. ; extern OSStatus ATSUClearLayoutControls(ATSUTextLayout iLayout, ItemCount iTagCount, ATSUAttributeTag iTag[2147483647])
  683. ;
  684.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  685.         IMPORT_CFM_FUNCTION ATSUClearLayoutControls
  686.     ENDIF
  687.  
  688.  
  689.  
  690. ;     Style run processing    
  691. ;
  692. ; extern OSStatus ATSUSetRunStyle(ATSUTextLayout iTextLayout, ATSUStyle iStyle, UniCharArrayOffset iRunStart, UniCharCount iRunLength)
  693. ;
  694.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  695.         IMPORT_CFM_FUNCTION ATSUSetRunStyle
  696.     ENDIF
  697.  
  698. ;
  699. ; extern OSStatus ATSUGetRunStyle(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, ATSUStyle *oStyle, UniCharArrayOffset *oRunStart, UniCharCount *oRunLength)
  700. ;
  701.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  702.         IMPORT_CFM_FUNCTION ATSUGetRunStyle
  703.     ENDIF
  704.  
  705. ;
  706. ; extern OSStatus ATSUGetContinuousAttributes(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, UniCharCount iLength, ATSUStyle oStyle)
  707. ;
  708.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  709.         IMPORT_CFM_FUNCTION ATSUGetContinuousAttributes
  710.     ENDIF
  711.  
  712. ;     Drawing and measuring    
  713. ;
  714. ; extern OSStatus ATSUDrawText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY)
  715. ;
  716.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  717.         IMPORT_CFM_FUNCTION ATSUDrawText
  718.     ENDIF
  719.  
  720. ;
  721. ; extern OSStatus ATSUMeasureText(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, UniCharCount iLineLength, ATSUTextMeasurement *oTextBefore, ATSUTextMeasurement *oTextAfter, ATSUTextMeasurement *oAscent, ATSUTextMeasurement *oDescent)
  722. ;
  723.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  724.         IMPORT_CFM_FUNCTION ATSUMeasureText
  725.     ENDIF
  726.  
  727. ;
  728. ; extern OSStatus ATSUMeasureTextImage(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineOffset, UniCharCount iLineLength, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, Rect *oTextImageRect)
  729. ;
  730.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  731.         IMPORT_CFM_FUNCTION ATSUMeasureTextImage
  732.     ENDIF
  733.  
  734. ;     Highlighting    
  735. ;
  736. ; extern OSStatus ATSUHighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  737. ;
  738.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  739.         IMPORT_CFM_FUNCTION ATSUHighlightText
  740.     ENDIF
  741.  
  742. ;
  743. ; extern OSStatus ATSUUnhighlightText(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength)
  744. ;
  745.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  746.         IMPORT_CFM_FUNCTION ATSUUnhighlightText
  747.     ENDIF
  748.  
  749. ;
  750. ; extern OSStatus ATSUGetTextHighlight(ATSUTextLayout iTextLayout, ATSUTextMeasurement iTextBasePointX, ATSUTextMeasurement iTextBasePointY, UniCharArrayOffset iHighlightStart, UniCharCount iHighlightLength, RgnHandle oHighlightRegion)
  751. ;
  752.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  753.         IMPORT_CFM_FUNCTION ATSUGetTextHighlight
  754.     ENDIF
  755.  
  756. ;     Hit-testing    
  757. ;
  758. ; extern OSStatus ATSUPositionToOffset(ATSUTextLayout iTextLayout, ATSUTextMeasurement iLocationX, ATSUTextMeasurement iLocationY, UniCharArrayOffset *ioPrimaryOffset, Boolean *oIsLeading, UniCharArrayOffset *oSecondaryOffset)
  759. ;
  760.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  761.         IMPORT_CFM_FUNCTION ATSUPositionToOffset
  762.     ENDIF
  763.  
  764. ;
  765. ; extern OSStatus ATSUOffsetToPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOffset, Boolean iIsLeading, ATSUCaret *oMainCaret, ATSUCaret *oSecondCaret, Boolean *oCaretIsSplit)
  766. ;
  767.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  768.         IMPORT_CFM_FUNCTION ATSUOffsetToPosition
  769.     ENDIF
  770.  
  771. ;     Cursor movement    
  772. ;
  773. ; extern OSStatus ATSUNextCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  774. ;
  775.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  776.         IMPORT_CFM_FUNCTION ATSUNextCursorPosition
  777.     ENDIF
  778.  
  779. ;
  780. ; extern OSStatus ATSUPreviousCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  781. ;
  782.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  783.         IMPORT_CFM_FUNCTION ATSUPreviousCursorPosition
  784.     ENDIF
  785.  
  786. ;
  787. ; extern OSStatus ATSURightwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  788. ;
  789.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION ATSURightwardCursorPosition
  791.     ENDIF
  792.  
  793. ;
  794. ; extern OSStatus ATSULeftwardCursorPosition(ATSUTextLayout iTextLayout, UniCharArrayOffset iOldOffset, ATSUCursorMovementType iMovementType, UniCharArrayOffset *oNewOffset)
  795. ;
  796.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  797.         IMPORT_CFM_FUNCTION ATSULeftwardCursorPosition
  798.     ENDIF
  799.  
  800. ;     Line breaking    
  801. ;
  802. ; extern OSStatus ATSUBreakLine(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineStart, ATSUTextMeasurement iLineWidth, Boolean iUseAsSoftLineBreak, UniCharArrayOffset *oLineBreak)
  803. ;
  804.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  805.         IMPORT_CFM_FUNCTION ATSUBreakLine
  806.     ENDIF
  807.  
  808. ;
  809. ; extern OSStatus ATSUSetSoftLineBreak(ATSUTextLayout iTextLayout, UniCharArrayOffset iLineBreak)
  810. ;
  811.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  812.         IMPORT_CFM_FUNCTION ATSUSetSoftLineBreak
  813.     ENDIF
  814.  
  815. ;
  816. ; extern OSStatus ATSUGetSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength, ItemCount iMaximumBreaks, UniCharArrayOffset oBreaks[2147483647], ItemCount *oBreakCount)
  817. ;
  818.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  819.         IMPORT_CFM_FUNCTION ATSUGetSoftLineBreaks
  820.     ENDIF
  821.  
  822. ;
  823. ; extern OSStatus ATSUClearSoftLineBreaks(ATSUTextLayout iTextLayout, UniCharArrayOffset iRangeStart, UniCharCount iRangeLength)
  824. ;
  825.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  826.         IMPORT_CFM_FUNCTION ATSUClearSoftLineBreaks
  827.     ENDIF
  828.  
  829. ;     Idle processing    
  830. ;
  831. ; extern OSStatus ATSUIdle(ATSUTextLayout iTextLayout)
  832. ;
  833.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  834.         IMPORT_CFM_FUNCTION ATSUIdle
  835.     ENDIF
  836.  
  837. ;     Font matching    
  838. ;
  839. ; extern OSStatus ATSUMatchFontsToText(ATSUTextLayout iTextLayout, UniCharArrayOffset iTextStart, UniCharCount iTextLength, ATSUFontID *oFont, UniCharArrayOffset *oChangedOffset, UniCharCount *oChangedLength)
  840. ;
  841.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  842.         IMPORT_CFM_FUNCTION ATSUMatchFontsToText
  843.     ENDIF
  844.  
  845. ;
  846. ; extern OSStatus ATSUSetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean iTransientFontMatching)
  847. ;
  848.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  849.         IMPORT_CFM_FUNCTION ATSUSetTransientFontMatching
  850.     ENDIF
  851.  
  852. ;
  853. ; extern OSStatus ATSUGetTransientFontMatching(ATSUTextLayout iTextLayout, Boolean *oTransientFontMatching)
  854. ;
  855.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  856.         IMPORT_CFM_FUNCTION ATSUGetTransientFontMatching
  857.     ENDIF
  858.  
  859. ;     Font ID's    
  860. ;
  861. ; extern OSStatus ATSUFontCount(ItemCount *oFontCount)
  862. ;
  863.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  864.         IMPORT_CFM_FUNCTION ATSUFontCount
  865.     ENDIF
  866.  
  867. ;
  868. ; extern OSStatus ATSUGetFontIDs(ATSUFontID oFontIDs[2147483647], ItemCount iArraySize, ItemCount *oFontCount)
  869. ;
  870.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  871.         IMPORT_CFM_FUNCTION ATSUGetFontIDs
  872.     ENDIF
  873.  
  874. ;
  875. ; extern OSStatus ATSUFONDtoFontID(short iFONDNumber, Style iFONDStyle, ATSUFontID *oFontID)
  876. ;
  877.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  878.         IMPORT_CFM_FUNCTION ATSUFONDtoFontID
  879.     ENDIF
  880.  
  881. ;
  882. ; extern OSStatus ATSUFontIDtoFOND(ATSUFontID iFontID, short *oFONDNumber, Style *oFONDStyle)
  883. ;
  884.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  885.         IMPORT_CFM_FUNCTION ATSUFontIDtoFOND
  886.     ENDIF
  887.  
  888. ;     Font names    
  889. ;
  890. ; extern OSStatus ATSUCountFontNames(ATSUFontID iFontID, ItemCount *oFontNameCount)
  891. ;
  892.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  893.         IMPORT_CFM_FUNCTION ATSUCountFontNames
  894.     ENDIF
  895.  
  896. ;
  897. ; extern OSStatus ATSUGetIndFontName(ATSUFontID iFontID, ItemCount iFontNameIndex, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, FontNameCode *oFontNameCode, FontPlatformCode *oFontNamePlatform, FontScriptCode *oFontNameScript, FontLanguageCode *oFontNameLenguage)
  898. ;
  899.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  900.         IMPORT_CFM_FUNCTION ATSUGetIndFontName
  901.     ENDIF
  902.  
  903. ;
  904. ; extern OSStatus ATSUFindFontName(ATSUFontID iFontID, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ByteCount iMaximumNameLength, Ptr oName, ByteCount *oActualNameLength, ItemCount *oFontNameIndex)
  905. ;
  906.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  907.         IMPORT_CFM_FUNCTION ATSUFindFontName
  908.     ENDIF
  909.  
  910. ;
  911. ; extern OSStatus ATSUFindFontFromName(Ptr iName, ByteCount iNameLength, FontNameCode iFontNameCode, FontPlatformCode iFontNamePlatform, FontScriptCode iFontNameScript, FontLanguageCode iFontNameLanguage, ATSUFontID *oFontID)
  912. ;
  913.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  914.         IMPORT_CFM_FUNCTION ATSUFindFontFromName
  915.     ENDIF
  916.  
  917. ;     Font features    
  918. ;
  919. ; extern OSStatus ATSUCountFontFeatureTypes(ATSUFontID iFont, ItemCount *oTypeCount)
  920. ;
  921.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  922.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureTypes
  923.     ENDIF
  924.  
  925. ;
  926. ; extern OSStatus ATSUCountFontFeatureSelectors(ATSUFontID iFont, ATSUFontFeatureType iType, ItemCount *oSelectorCount)
  927. ;
  928.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  929.         IMPORT_CFM_FUNCTION ATSUCountFontFeatureSelectors
  930.     ENDIF
  931.  
  932. ;
  933. ; extern OSStatus ATSUGetFontFeatureTypes(ATSUFontID iFont, ItemCount iMaximumTypes, ATSUFontFeatureType oTypes[2147483647], ItemCount *oActualTypeCount)
  934. ;
  935.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  936.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureTypes
  937.     ENDIF
  938.  
  939. ;
  940. ; extern OSStatus ATSUGetFontFeatureSelectors(ATSUFontID iFont, ATSUFontFeatureType iType, ItemCount iMaximumSelectors, ATSUFontFeatureSelector oSelectors[2147483647], Boolean oSelectorIsOnByDefault[2147483647], ItemCount *oActualSelectorCount, Boolean *oIsMutuallyExclusive)
  941. ;
  942.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  943.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureSelectors
  944.     ENDIF
  945.  
  946. ;
  947. ; extern OSStatus ATSUGetFontFeatureNameCode(ATSUFontID iFont, ATSUFontFeatureType iType, ATSUFontFeatureSelector iSelector, FontNameCode *oNameCode)
  948. ;
  949.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  950.         IMPORT_CFM_FUNCTION ATSUGetFontFeatureNameCode
  951.     ENDIF
  952.  
  953. ;     Font variations    
  954. ;
  955. ; extern OSStatus ATSUCountFontVariations(ATSUFontID iFont, ItemCount *oVariationCount)
  956. ;
  957.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  958.         IMPORT_CFM_FUNCTION ATSUCountFontVariations
  959.     ENDIF
  960.  
  961. ;
  962. ; extern OSStatus ATSUGetIndFontVariation(ATSUFontID iFont, ItemCount iVariationIndex, ATSUFontVariationAxis *oATSUFontVariationAxis, ATSUFontVariationValue *oMinimumValue, ATSUFontVariationValue *oMaximumValue, ATSUFontVariationValue *oDefaultValue)
  963. ;
  964.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  965.         IMPORT_CFM_FUNCTION ATSUGetIndFontVariation
  966.     ENDIF
  967.  
  968. ;
  969. ; extern OSStatus ATSUGetFontVariationNameCode(ATSUFontID iFont, ATSUFontVariationAxis iAxis, FontNameCode *oNameCode)
  970. ;
  971.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  972.         IMPORT_CFM_FUNCTION ATSUGetFontVariationNameCode
  973.     ENDIF
  974.  
  975.  
  976. ;     Font Instances    
  977. ;
  978. ; extern OSStatus ATSUCountFontInstances(ATSUFontID iFont, ItemCount *oInstances)
  979. ;
  980.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  981.         IMPORT_CFM_FUNCTION ATSUCountFontInstances
  982.     ENDIF
  983.  
  984. ;
  985. ; extern OSStatus ATSUGetFontInstance(ATSUFontID iFont, ItemCount iFontInstanceIndex, ItemCount iMaximumVariations, ATSUFontVariationAxis oAxes[2147483647], ATSUFontVariationValue oValues[2147483647], ItemCount *oActualVariationCount)
  986. ;
  987.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  988.         IMPORT_CFM_FUNCTION ATSUGetFontInstance
  989.     ENDIF
  990.  
  991. ;
  992. ; extern OSStatus ATSUGetFontInstanceNameCode(ATSUFontID iFont, ItemCount iInstanceIndex, FontNameCode *oNameCode)
  993. ;
  994.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  995.         IMPORT_CFM_FUNCTION ATSUGetFontInstanceNameCode
  996.     ENDIF
  997.  
  998.     ENDIF ; __ATSUNICODE__ 
  999.  
  1000.